package com.crm.service;

import java.util.List;

import com.crm.dao.NoteForContactsDao;
import com.crm.pojo.Contacts;
import com.crm.pojo.NoteForContacts;
import com.crm.pojo.User;

public class NoteForContactsService {
	
	private NoteForContactsDao noteForContactsDao;
	

	public List<NoteForContacts> findListByContactsId(String contactsId) {
		String hql = "from NoteForContacts where t_contacts_Id = ?";
		return noteForContactsDao.find(hql, contactsId);
	}

	public void saveContactsNote(NoteForContacts noteForContacts, Contacts cont, User user) {
		noteForContacts.setUser(user);
		noteForContacts.setContact(cont);
		noteForContacts.setId(null);
		noteForContactsDao.save(noteForContacts);
	}
	
	//set
	public void setNoteForContactsDao(NoteForContactsDao noteForContactsDao) {
		this.noteForContactsDao = noteForContactsDao;
	}
}
